SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vwIncumbencias
AS
SELECT     dbo.tb_Incumbencias.idIncumbencia AS ID, dbo.tb_Incumbencias.GrupoIncumbencia, dbo.vwrAsignaturasGenericas.ID AS IdAsignaturaGenerica, 
                      dbo.vwrAsignaturasGenericas.Descripcion AS AsignaturaGenerica, dbo.vwrCargosGenericos.ID AS IdCargoGenerico, 
                      dbo.vwrCargosGenericos.Descripcion AS CargoGenerico
FROM         dbo.tb_Incumbencias INNER JOIN
                      dbo.vwrCargosGenericos ON dbo.tb_Incumbencias.CargoGenerico = dbo.vwrCargosGenericos.ID INNER JOIN
                      dbo.vwrAsignaturasGenericas ON dbo.tb_Incumbencias.AsignaturaGenerica = dbo.vwrAsignaturasGenericas.ID
GO
GRANT SELECT ON  [dbo].[vwIncumbencias] TO [Juntas]
GRANT SELECT ON  [dbo].[vwIncumbencias] TO [SoloVer]
GO
